This page last changed on Jun 26, 2007 by rosspatterson.

The Project Trigger is used to trigger a build when the specified dependent project has completed its build. This trigger can help you split your build process across projects and servers. For example, you could have a CCNet project that will trigger the regression test suite once the main development build has completed successfully. This dependent build could be running on either a local or a remote CCNet server.

The Project Trigger works by using .NET remoting to poll the status of the dependent project. Whenever it detects that the dependent project has completed a build, the Project Trigger will fire. The Project Trigger can be configured to fire when the dependent project build succeeded, failed or threw an exception. In order to avoid hammering the remote project through polling, the Project Trigger is composed of an Interval Trigger that will set a polling interval to 5 seconds. This inner trigger can be adjusted through changing the configuration.

Examples

NOTE: Like all triggers, the projectTrigger must be enclosed within a triggers element in the appropriate Project Configuration Block

Minimalist example:

<projectTrigger project="Core"  />

Full example:

<projectTrigger serverUri="tcp://server:21234/CruiseManager.rem" project="Server">
    <triggerStatus>Success</triggerStatus>
    <innerTrigger type="intervalTrigger" seconds="30" buildCondition="ForceBuild"/>
</projectTrigger>

Configuration Elements:

Node Description Type Required Default
project The name of the dependent project to trigger a build from. string true N/A
serverUri The URI for the CCNet server containing the dependent project. string false tcp://localhost:21234/CruiseManager.rem
triggerStatus The status of the dependent project that will be used to trigger the build. For example, if this value is set to Success then a build will be triggered when the dependent project completes a successful build. Possible values are Success, Failure, Exception and Unknown. string false Success
innerTrigger The trigger used to modulate the polling interval for the ProjectTrigger. By default, this is set to a ForceBuild IntervalTrigger that will cause
the trigger to check the status of the dependent project every 5 seconds
trigger xml false 5-second ForceBuild IntervalTrigger

There is currently a limitation in the Project Trigger in that it will always trigger a build when the inner trigger fires (at the end of the first interval for an Interval Trigger). This is because the Project Trigger has no way to save its state from a previous server run. So the last time that the build was triggered is not retrievable when the server restarts.

The Project Trigger is included in the CCNet 1.0 release and later.

Document generated by Confluence on Mar 14, 2009 02:55